<?php

namespace App\Http\Controllers\Api;

use App\Http\Controllers\Controller;
use App\Models\Hospital;
use App\Services\CourseService;
use App\Services\HospitalService;
use Illuminate\Http\Request;

class HomeController extends Controller
{
    //
    public function index(CourseService $courseService, HospitalService $hospitalService)
    {
    
        $count = $courseService->homeCount();
        // print_r($coursecount); exit;
        $recommondCourse = $courseService->getRecommend(1,10);
        $recommondHospital = $hospitalService->getRecommend(10);
        return $this->success(array_merge($count, ['re_course'=>$recommondCourse, 're_hospital'=>$recommondHospital]));
    }
}
